package com.probiz.estore.common.model.eai.log.base;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.probiz.estore.core.model.BaseObject;

/**
 * EaiJobLog Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 */
public class EaiJobLogTbl extends BaseObject implements Serializable {

    protected Integer eaiJobLogId;
	protected String jobName;
	protected Short actionType;
	protected String errorMessage;
	protected Short status;
	protected java.util.Date jobExecuteTime;


	/**
	 * Default Empty Constructor for class EaiJobLog
	 */
	public EaiJobLogTbl () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class EaiJobLog
	 */
	public EaiJobLogTbl (
		 Integer in_eaiJobLogId
        ) {
		this.setEaiJobLogId(in_eaiJobLogId);
    }

    

	/**
	 * 	 * @return Integer
     * @hibernate.id column="eaiJobLogId" type="java.lang.Integer" generator-class="native"
	 */
	public Integer getEaiJobLogId() {
		return this.eaiJobLogId;
	}
	
	/**
	 * Set the eaiJobLogId
	 */	
	public void setEaiJobLogId(Integer aValue) {
		this.eaiJobLogId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="jobName" type="java.lang.String" length="64" not-null="true" unique="false"
	 */
	public String getJobName() {
		return this.jobName;
	}
	
	/**
	 * Set the jobName
	 * @spring.validator type="required"
	 */	
	public void setJobName(String aValue) {
		this.jobName = aValue;
	}	

	/**
	 * 	 * @return Short
	 * @hibernate.property column="actionType" type="java.lang.Short" length="5" not-null="true" unique="false"
	 */
	public Short getActionType() {
		return this.actionType;
	}
	
	/**
	 * Set the actionType
	 * @spring.validator type="required"
	 */	
	public void setActionType(Short aValue) {
		this.actionType = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="errorMessage" type="java.lang.String" length="256" not-null="false" unique="false"
	 */
	public String getErrorMessage() {
		return this.errorMessage;
	}
	
	/**
	 * Set the errorMessage
	 */	
	public void setErrorMessage(String aValue) {
		this.errorMessage = aValue;
	}	

	/**
	 * 	 * @return Short
	 * @hibernate.property column="status" type="java.lang.Short" length="5" not-null="true" unique="false"
	 */
	public Short getStatus() {
		return this.status;
	}
	
	/**
	 * Set the status
	 * @spring.validator type="required"
	 */	
	public void setStatus(Short aValue) {
		this.status = aValue;
	}	

	/**
	 * 	 * @return java.util.Date
	 * @hibernate.property column="jobExecuteTime" type="java.util.Date" length="19" not-null="true" unique="false"
	 */
	public java.util.Date getJobExecuteTime() {
		return this.jobExecuteTime;
	}
	
	/**
	 * Set the jobExecuteTime
	 * @spring.validator type="required"
	 */	
	public void setJobExecuteTime(java.util.Date aValue) {
		this.jobExecuteTime = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof EaiJobLogTbl)) {
			return false;
		}
		EaiJobLogTbl rhs = (EaiJobLogTbl) object;
		return new EqualsBuilder()
				.append(this.eaiJobLogId, rhs.eaiJobLogId)
				.append(this.jobName, rhs.jobName)
				.append(this.actionType, rhs.actionType)
				.append(this.errorMessage, rhs.errorMessage)
				.append(this.status, rhs.status)
				.append(this.jobExecuteTime, rhs.jobExecuteTime)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.eaiJobLogId) 
				.append(this.jobName) 
				.append(this.actionType) 
				.append(this.errorMessage) 
				.append(this.status) 
				.append(this.jobExecuteTime) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("eaiJobLogId", this.eaiJobLogId) 
				.append("jobName", this.jobName) 
				.append("actionType", this.actionType) 
				.append("errorMessage", this.errorMessage) 
				.append("status", this.status) 
				.append("jobExecuteTime", this.jobExecuteTime) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "eaiJobLogId";
	}
	
	/**
	 * Return the Id (pk) of the entity, must be Integer
	 */
	public Integer getId() {
		return eaiJobLogId;
	}

}